import com.example.mytips.jsonToFlutterEntity.MyEntityLog;
import org.junit.Test;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

public class MyTestJsonToEntity {
    @Test
    public void test() {

        HashMap<String, Object> map = new HashMap<>();
        map.put("keyInt", 1);
        map.put("keyStr", "String");
        map.put("keyBool", true);
        map.put("keyDouble", 1.2);

        List<Boolean> strList = new ArrayList<>();
        strList.add(true);
        map.put("list1", strList);

        List<Integer> strList2 = new ArrayList<>();
        strList2.add(1);
        map.put("list2", strList2);
//
        List<HashMap<String, Object>> mapList = new ArrayList<>();
        HashMap<String, Object> map3 = new HashMap<>();
        map3.put("a", 1);
        mapList.add(map3);
        map.put("list3", mapList);
//
        HashMap<String, Object> map2 = new HashMap<>();
        map2.put("keyStr", "String");
        map.put("keyMapList", map2);

        HashMap<String, Object> map4 = new HashMap<>();
        map4.put("keyStr", "String");
        map2.put("yc", map4);

        String log = MyEntityLog.log("Entity2", map);
        System.out.println(log);
    }

}
